import {createRouter, createWebHistory} from 'vue-router'


const routes = [
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    // }
    {
        path: "/",
        name: "blog",
        redirect: '/index',
        component: () => import("@/views/blog/blog.vue"),
        children: [
            {
                path: "/index",
                name: "index",
                component: () => import("@/views/blog/index.vue")
            },
            {
                path: "/article",
                name: "article",
                component: () => import("@/views/blog/article.vue")
            }
        ]
    }

]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
